package edu.spec.lyq.week09.class2.classroom;

/**
 * \* User: 11028
 * \* Date: 2018/10/26
 * \* Time: 10:02
 * \* Description:
 */
public class Student {
    private String name;
    private String number;

    public Student(String name, String number) {
        this.name = name;
        this.number = number;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public String getNumber() {
        return number;
    }
    public void study(int i) throws Exception{
        if(i == 5){
            Exception e = new Exception("周五罢学");
            throw e;  //报异常
        }
        System.out.println("好好学习，天天向上");
    }
}
